package cn.zl.web.dto.streamproxy;

import cn.hutool.core.util.StrUtil;
import cn.yunbamboos.rest.service.dto.out.GenericOutDTO;

public class AddStreamProxyOutDTO extends GenericOutDTO {

    public static AddStreamProxyOutDTO error(String template, Object... params){
        return error(500, StrUtil.format(template, params));
    }

    public static AddStreamProxyOutDTO error(String msg){
        return error(500, msg);
    }

    public static AddStreamProxyOutDTO error(int code, String msg){
        AddStreamProxyOutDTO out = new AddStreamProxyOutDTO();
        out.code = code;
        out.msg = msg;
        return out;
    }
}
